package com.hn658.user.sync;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.hn658.user.config.service.IBaseUserConfig;

@Component
public class Env implements InitializingBean{
	
	@Autowired
	private IBaseUserConfig config;
	
	public static String OAPI_HOST = "https://oapi.dingtalk.com";
	
	public static String OA_BACKGROUND_URL = ""; 
	
	public static String CORP_ID = "ding496edacf211b25c7";
	
	public static String SECRET = "8C92n1twBfR_48w4e0437UyZfkyKaioIsuJdj0Jby1ooHvb901vT6uuFrFczApTZ";
	
	public static String SSO_Secret = "5NNoWABzRH_-l42wNSeUyi4NI1-nGHJAUUN0CAXyj90QL1lIG0puVtHyfueNY0Wm";

	@Override
	public void afterPropertiesSet() throws Exception {
		Env.OAPI_HOST = config.getOaApiHost();
		Env.OA_BACKGROUND_URL = config.getOaBackGroundUrl();
		Env.CORP_ID = config.getCorpId();
		Env.SECRET = config.getSecret();
		Env.SSO_Secret = config.getSsoSecret();
	}
	
}
